<!DOCTYPE html>
<html>

<head>
	<meta charset="UTF-8">
	<title>招生报名</title>
	<link rel="stylesheet" href="../css/common2.css">
</head>

<body>
	<div id="vue-root" style="margin-top: 30px;">

		<div class="table">
			<table class="table_top">
				<thead>
					<tr>
						<th>
							<input type="checkbox" class="check-box" v-model="all">序号
						</th>
						<th>姓名</th>
						<th>性别</th>
						<th>年级</th>
						<th>手机号</th>
						<th>年龄</th>
						<th>住址</th>
						<th v-if="able.del">删除</th>
					</tr>
				</thead>
				<tbody id="list">
					<tr v-for="(signup,index) in list" :key="signup.id">
						<td>
							<input type="checkbox" class="check-box" v-model="signup.checked">
							<span v-text="index+1"></span>
						</td>
						<td v-text="signup.name"></td>
						<td v-text="signup.sex?'男':'女'"></td>
						<td v-text="signup.grade"></td>
						<td v-text="signup.phone"></td>
						<td v-text="signup.age"></td>
						<td v-text="signup.address"></td>
						<td v-if="able.del">
							<div>
								<div class="delete-icon option-icon" @click="del([signup.id])">
									<img class="img" src="../image/delete.png" height="20" width="20"
										onmouseover="this.src='../image/delete_light.png'"
										onmouseout="this.src='../image/delete.png'" />
								</div>
							</div>
						</td>
					</tr>
				</tbody>
			</table>
		</div>
		<br>
		<div class="delete" @click="batchDelete" v-if="able.del">批量删除</div>
		<ul class="pagination" v-if="pages>1">
			<li>
				<a v-if="pageNum!=1" @click="pageNum=1">«</a>
				<a class="pages-jump" v-if="pageNum!=1" @click="pageNum--">‹</a>
				<a v-text="pageNum"></a>
				<a class="pages-jump" v-if="pageNum!=pages" @click="pageNum++">›</a>
				<a v-if="pageNum!=pages" @click="pageNum=pages">»</a>
			</li>
		</ul>

	</div>
	<script src="/scriptZIP/qs.min.js"></script>
	<script src="/scriptZIP/vue.min.js"></script>
	<script src="/scriptZIP/axios.min.js"></script>

	<script src="/js/common.js"></script>
	<script src="/js/list.js"></script>
	<script src="/js/auth_util.js"></script>

	<script>
		var app = new Vue(merge({
			data: {
				urls: {
					del: '/pc/signup/del',
					list: '/pc/signup/list/' + top_params().id
				}
			},
			created: function () {
				this.getData();
				abled('signup', this);
			},
		}));
	</script>

</body>

</html>